﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QueryCondition.aspx.cs"
    Inherits="Admin.Zonghe.QueryCondition" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>房产信息查询条件设置</title>
    <link href="/Admin/Css/rightbar.css?FileVersion=<%=FileVersion %>" rel="stylesheet"
        type="text/css" />
    <script src="/admin/Scripts/Calendar2008.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
    <script src="/Admin/Scripts/jquery-1.4.1.min.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
    <script src="/admin/Scripts/Check.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
</head>
<body>
    <div class="warp">
        <div class="topnav">
            <ul>
                <li><a href="javascript:void(0);" style="cursor: default;" class="on_nav"><span>房产信息查询</span></a></li>
            </ul>
        </div>
        <form id="form1" name="form1" action="Query.aspx">
        <div class="tab mt15">
            <ul>
                <li class="in_on"><strong>查询条件设置</strong></li>
            </ul>
        </div>
        <div class="cont" style="padding: 0; width: 678px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="stb01">
                <tr style="padding: 2px 0 2px 15px; height: 34px; vertical-align: middle;">
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%; padding-left: 10px;">
                        房产编号：<input type="text" name="txtCertificateID" id="txtCertificateID" style="width: 105px;" />
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        房主姓名：<input type="text" name="txtName" id="txtName" style="width: 105px;" maxlength="25" />
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        身份证号：<input type="text" id="txtIDCardNum" name="txtIDCardNum" class="input200_out"
                            idcardnum="房主身份证号格式错" style="width: 105px;" />
                    </td>
                </tr>
                <tr style="padding: 2px 0 2px 10px; height: 34px;">
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%; padding-left: 10px;
                        display: <%= isQueryDepartmentOnly ? "none" : "" %>;">
                        所属部门：<select name="selDepart" id="selDepart" style="width: 115px;">
                            <option value="">请选择所属部门</option>
                            <%=OutputSelectOptions(dtDepartmet, "name", "id")%>
                        </select>
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%; padding-left: <%= isQueryDepartmentOnly ? "10px" : "0" %>;">
                        管理人员：<select id="selManager" name="selManager" style="width: 115px;">
                            <option value="">请选择管理人员</option>
                        </select>
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        完税状态：<select id="selIsTaxOK" name="selIsTaxOK" style="width: 115px;">
                            <option value="">请选择是否完税</option>
                            <option value="1">是</option>
                            <option value="0">否</option>
                        </select>
                    </td>
                </tr>
                <tr style="padding: 2px 0 2px 10px; height: 34px;">
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%; padding-left: 10px;">
                        所属乡镇：<select id="selXiangzhen" name="selXiangzhen" style="width: 115px;">
                            <option value="">请选择所属乡镇</option>
                            <%=OutputSelectOptions(dtXiangzhen, "name", "id")%>
                        </select>
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        所属街道：<select id="selJiedao" name="selJiedao" style="width: 115px;">
                            <option value="">请选择所属街道</option>
                        </select>
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        房产类型：<select id="selHouseType" name="selHouseType" style="width: 115px;">
                            <option value="">请选择房产类型</option>
                            <option value="闲置">闲置</option>
                            <option value="自用">自用</option>
                            <option value="出租">出租</option>
                            <option value="拆除">拆除</option>
                        </select>
                    </td>
                </tr>
                <tr style="padding: 2px 0 2px 15px; height: 34px; vertical-align: middle;">
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%; padding-left: 10px;">
                        承租人姓名：<input type="text" name="txtRentName" id="txtRentName" style="width: 95px;" />
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        承租人身份证：<input type="text" name="txtRentIDCardNum" id="txtRentIDCardNum" style="width: 105px;"
                            maxlength="25" idcardnum="承租人身份证号格式错" />
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                        承租日期：<input type="text" id="txtStartDate" name="txtStartDate" class="input200_out"
                            style="width: 54px;" maxlength="50" date="承租开始日期格式错" />
                        -
                        <input type="text" id="txtEndDate" name="txtEndDate" class="input200_out" style="width: 54px;"
                            maxlength="50" date="承租结束日期格式错" />
                    </td>
                </tr>
                <tr style="padding: 2px 0 2px 15px; height: 34px; vertical-align: middle;">
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%; padding-left: 10px;">
                        所在地段：<select id="selDiduan" name="selDiduan" style="width: 115px;">
                            <option value="">请选择所在地段</option>
                            <%=OutputSelectOptions(dtDiduan, "name", "id")%>
                        </select>
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                         税款属期：<select id="selYear" name="selYear" style="width: 115px;">
                            <%=CreateYear(null) %>
                        </select>
                    </td>
                    <td align="left" valign="middle" bgcolor="#F3FBFE" style="width: 33%">
                    </td>
                </tr>
            </table>
        </div>
        <div class="tab mt15">
            <ul>
                <li class="in_on"><strong>底册输出项目设置</strong></li>
            </ul>
        </div>
        <div class="cont" style="padding: 0; width: 678px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="stb01">
                <%=OutputQueryFields()%>
            </table>
        </div>
        </form>
        <div class="btudiv">
            <ul style="width: 180px;">
                <li>
                    <input name="Submit1" type="submit" id="Submit1" class="button_sure" onclick="return CheckForm()"
                        value="查询数据" /></li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">

        function CheckForm() {
            var obj = document.form1.elements;
            if (!checkAttr(obj)) {
                return false;
            }
            var chOutputValue = '';
            $('input[name="ckOutputFields"]:checked').each(function () {
                chOutputValue += $(this).val();
            })
            if (chOutputValue == '') {
                alert("请先设置底册输出内容");
                return false;
            }
            $("#form1").submit();
            return true;
        }
    </script>
    <script type="text/javascript">
        var c = new Calendar("c");
        c.offsetTop = 30;
        document.write(c);

        $(function () {
            //为日期输入框增加日历控件
            $(":input[date]").bind("focus", function (event) {
                c.showMoreDay = false;
                c.show(this); this.
                className = 'input60_on';
                this.onmouseout = ''
            });
        });

        //初始化
        jQuery(function ($) {
            $("#selDepart").change(function () {
                GetManagerList();
            });
            $("#selXiangzhen").change(function () {
                GetJiedaoList();
            });
        });
        //获取街道列表
        function GetJiedaoList() {
            var xianzhenID = $("#selXiangzhen").val();
            var url = "/Admin/AjaxPage/DiduanConfig.aspx?action=getjiedaolist&xianzhenID=" + xianzhenID + "&timestamp=" + (new Date()).getTime();
            $.ajax({
                url: url,
                success: function (data) {
                    $("#selJiedao").empty();
                    $("<option value=''>请选择所属街道</option>").appendTo($("#selJiedao"));
                    $(data).appendTo($("#selJiedao"));
                },
                error: function (data) {
                    alert("获取街道信息失败，请刷新页面重试!");
                }
            });
        }
        //获取管理员列表
        function GetManagerList() {
            var departmentID = $("#selDepart").val();
            var url = "/Admin/AjaxPage/UserInfo.aspx?action=getmanagerlist&departmentID=" + departmentID + "&timestamp=" + (new Date()).getTime();
            $.ajax({
                url: url,
                success: function (data) {
                    $("#selManager").empty();
                    $("<option value='0'>请选择管理员</option>").appendTo($("#selManager"));
                    $(data).appendTo($("#selManager"));
                },
                error: function (data) {
                    alert("获取管理员信息失败，请刷新页面重试!");
                }
            });
        }
    </script>
</body>
</html>
